package com.hxf.dao.version.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hxf.dao.BaseDaoImpl;
import com.hxf.dao.version.VersionDao;
import com.hxf.dto.VersionDto;
import com.hxf.exception.DaoLevelException;

/**
 * DAO版本实现类
 * @author tengyicheng
 * @version [1.0, 2013/09/22]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@SuppressWarnings("unchecked")
@Repository("versionDao")
public class VersionDaoImpl extends BaseDaoImpl implements VersionDao {

	@Override
	public VersionDto findVersionDto() throws DaoLevelException {
	   List<VersionDto> list = super.findBy("from VersionDto where status=0");
	   if (list != null && list.size() > 0) {
		   return list.get(0);
	   }
		return new VersionDto();
	}

}
